/**
 * fileName:com.zimo.web.service.impl.UserServiceImpl.java
 * projectName:Zimo
 */
package com.zimo.web.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zimo.web.entity.User;
import com.zimo.web.mapper.UserMapper;
import com.zimo.web.service.UserService;

/**
 * 用户业务层实现类
 * @author sg.z/2013-12-19/上午9:56:00
 */
@Service(value="userService")
public class UserServiceImpl implements UserService {

	@Resource
	private UserMapper userMapper;
	
	
	/* (non-Javadoc)
	 * @see com.zimo.web.service.UserService#insertUser(com.zimo.web.entity.User)
	 */
	@Override
	public void insertUser(User user) {
		userMapper.insertUser(user);
	}


	/* (non-Javadoc)
	 * @see com.zimo.web.service.UserService#getUserByName(java.lang.String)
	 */
	@Override
	public User getUserByName(String userName) {
		return userMapper.getUserByName(userName);
	}


	/* (non-Javadoc)
	 * @see com.zimo.web.service.UserService#getUserByEmail(java.lang.String)
	 */
	@Override
	public User getUserByEmail(String userEmail) {
		return userMapper.getUserByEmail(userEmail);
	}


	/* (non-Javadoc)
	 * @see com.zimo.web.service.UserService#getUserByNameAndPass(java.lang.String, java.lang.String)
	 */
	@Override
	public User getUserByNameAndPass(String userName, String userPass) {
		return userMapper.getUserByNameAndPass(userName, userPass);
	}


}
